I'm currently learning some Javascript through Codecademy and I ran into this problem. When I run my program I get [Function: getComputerChoice] output to the console instead of what I'm expecting.
Here's my code:
function getComputerChoice() {
Math.floor(Math.random() * 3);
switch (getComputerChoice) {
case 0:
return 'rock';
break;
case 1:
return 'paper';
case 2:
return 'scissors'
}
}
Thanks for taking the time to read my question.